<!-- 搜索框组件 -->
<template>
  <div class="searchInput">
    <div class="button">
      <div class="content"
        @click="showSearchPanel(true)">
        <img src="../imgs/search.png"
          alt="">
        <span>鼠标垫</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    showSearchPanel: Function
  },
  data () {
    return {

    }
  },
  // 生命周期 - 创建完成（访问当前this实例）
  created () {

  },
  // 生命周期 - 挂载完成（访问DOM元素）
  mounted () {

  }
}
</script>
<style lang='stylus' scoped>
/* @import url(); 引入css类 */
.searchInput {
  width: 100%;
  height: 3.1875rem;
  border-bottom: 0.0625rem solid #dddddd;
  position: fixed;
  z-index: 999;
  background-color: white;
  left: 0;
  top: 0;

  .button {
    width: 100%;
    height: 100%;
    padding: 0.375rem 0.875rem;
    box-sizing: border-box;

    .content {
      width: 100%;
      height: 100%;
      background-color: #ededed;
      border-radius: 0.5rem;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      color: #9c9c9c;

      img {
        width: 1.25rem;
        display: block;
        margin-right: 0.1875rem;
      }
    }
  }
}
</style>
